layui.use(['laydate', 'layer', 'form'], function () {
    var $ = layui.jquery, layer = layui.layer, laydate = layui.laydate, form = layui.form;
    laydate.render({
        elem: '#date'
        , format: 'yyyy/MM/dd',
        max: 9,
        min: 2
    });
    $(".layui-my-custom-article:not('.layui-my-custom-article-disabled')").on("click", function () {
        var classroom = $(this).attr("content");
        var jysj = $("input[name='date']").val();
        if ("" == jysj) {
            layer.msg('请选择借用日期！', {icon: 5});
            return;
        }
        layer.confirm('', {
            btn: ['借用情况', '教室借用'], //按钮
            title:'教室借用信息'
        }, function () {
            layer.open({
                type: 2,
                area: ['80%', '80%'],
                fixed: true, //不固定
                maxmin: true,
                title: '借用情况',
                content: '/uc/classroom/user/' + classroom + '?date=' + jysj
            })
        }, function () {
            layer.open({
                type: 2,
                area: ['80%', '80%'],
                fixed: true, //不固定
                maxmin: true,
                title: '教室借用',
                content: '/uc/classroom/entity/' + classroom + '?date=' + jysj
            })
        });
    });

});